Do not leak unapplied layout properties
authorEmmanuele Bassi <ebassi@gnome.org>
Thu, 28 Mar 2019 17:22:02 +0000 (17:22 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Thu, 28 Mar 2019 17:22:02 +0000 (17:22 +0000)
If the layout manager does not have a GtkLayoutChild, or if we cannot
apply layout properties, we should free them instead of leaking them.

gtk/gtkwidget.c

index 8b57fdf415b8ddfda3d71f283d06fe95e661b9ba..be0a2e812625c70e2ef98f89417794ab82314374 100644 (file)
@@ -10478,6 +10478,8 @@ gtk_widget_buildable_custom_finished (GtkBuildable *buildable,
                                                        parent,
                                                        layout_data);
 
+      /* Free the unapplied properties, if any */
+      g_slist_free_full (layout_data->properties, layout_property_info_free);
       g_object_unref (layout_data->object);
       g_slice_free (LayoutParserData, layout_data);
     }